let app = getApp()
Component({
    properties: {
      type:String,
      list: {
        type: Array
      },
      isDetail: {
        type: Boolean,
        default: !1
      },
      styleType:String,
      position:String,
      cur:Number
      },
      data:{
        getGlobalColor:app.globalData.globalColor
      },
    lifetimes: {
        attached: function () {
               this.setData({
                getGlobalColor:app.globalData.globalColor
               })
         }
      },
    methods: {
      choosecat:function(e){
        var choose=[];
        choose['cur']=e.currentTarget.dataset.key;
        choose['catid']=e.currentTarget.dataset.catid;
        this.setData({
          cur:e.currentTarget.dataset.key
        }) 
        this.triggerEvent ('catlist',choose)
      }
    }
});
